// pages/home/home.js
Page({
  /**
   * 页面的初始数据
   */
  data: {
    indicatordots:false,
    autoplay:true,
    interval:2000,
    current: 0,
    index:0,
// 新品展示
showArr: [
  {imgSrc: "/images/home/newPro1.jpg", imgTxt: "卡布奇诺"},
  {imgSrc: "/images/home/newPro2.jpg", imgTxt: "白咖啡"},
  {imgSrc: "/images/home/newPro3.jpg", imgTxt: "摩卡咖啡"},
  {imgSrc: "/images/home/newPro4.jpg", imgTxt: "爱尔兰咖啡"},
  {imgSrc: "/images/home/newPro5.jpg", imgTxt: "甜品咖啡"},
  {imgSrc: "/images/home/newPro6.jpg", imgTxt: "意大利咖啡"},
  {imgSrc: "/images/home/newPro7.jpg", imgTxt: "拿铁咖啡"},
  {imgSrc: "/images/home/newPro8.jpg", imgTxt: "中式咖啡"}
],

// 轮播图
backgroundArr: [
  "/images/banner/baner1.jpg",
  "/images/banner/baner2.jpg",
  "/images/banner/baner3.jpg",
  "/images/banner/baner4.jpg"
],

// 横向滚动卡片
xArr: [
  {
    src: "/images/home/card01.jpg",
    text: '给特别的你'
  },
  {
    src: "/images/home/card02.jpg",
    text: '我想对你说'
  },
  {
    src: "/images/home/card03.jpg",
    text: '勇敢爱'
  },
  {
    src: "/images/home/card04.jpg",
    text: '一个人的精彩'
  },
  {
    src: "/images/home/card05.jpg",
    text: '萌萌哒'
  },
  {
    src: "/images/home/card06.jpg",
    text: '友谊万岁'
  },
  {
    src: "/images/home/card07.jpg",
    text: '恋人未满'
  },
  {
    src: "/images/home/card08.jpg",
    text: '生日快乐'
  }
]
  },
  natie(e){
    console.log(e);
    this.setData({
      current:e.detail.current
    })
  }
})